import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getCategoryApi } from "@/apis/layout";

export const useCategoryStore = defineStore('category', () => {
    // 导航菜单
    const categoryStore = ref([])
    // 获取导航菜单接口
    const getCategory = async () => {
        const res = await getCategoryApi()
        categoryStore.value = res.result
    }
    return { categoryStore, getCategory }
})
